<!doctype html>
<html lang="zh-CN">
<head>

    <meta charset="utf-8">
    <meta name="generator" content="Hugo 0.74.1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>上传图片到Azure | caijinglong的博客</title>
    <meta property="og:title" content="上传图片到Azure - caijinglong的博客">
    <meta property="og:type" content="article">
        
    <meta property="article:published_time" content="2020-01-31T14:08:04&#43;08:00">
        
        
    <meta property="article:modified_time" content="2020-01-31T14:08:04&#43;08:00">
        
    <meta name="Keywords" content="golang,go语言,flutter,caijinglong,java,android,博客,项目管理,python,软件架构,公众号,小程序">
    <meta name="description" content="上传图片到Azure">
        
    <meta name="author" content="caijinglong">
    <meta property="og:url" content="http://www.kikt.top/posts/other/upload-image-to-azure/">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">

    <link rel="stylesheet" href="/css/normalize.css">
    
        <link rel="stylesheet" href="/css/prism.css">
    
    <link rel="stylesheet" href="/css/style.css">
    <script type="text/javascript" src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>

    

   
    <script>
        (function(){
            var bp = document.createElement('script');
            var curProtocol = window.location.protocol.split(':')[0];
            if (curProtocol === 'https') {
                bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
            }
            else {
                bp.src = 'http://push.zhanzhang.baidu.com/push.js';
            }
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(bp, s);
        })();
    </script>

    
    
</head>

<body>
<header id="header" class="clearfix">
    <div class="container">
        <div class="col-group">
            <div class="site-name ">
                
                    <a id="logo" href="http://www.kikt.top">
                        caijinglong的博客
                    </a>
                
                <p class="description">Android/Flutter开发者，对于golang/python/ios/java 均有所了解</p>
            </div>
            <div>
                <nav id="nav-menu" class="clearfix">
                    <a class="" href="http://www.kikt.top">首页</a>
                    
                    <a  href="http://www.kikt.top/archives/" title="归档">归档</a>
                    
                    <a  href="http://www.kikt.top/contact/" title="接单">接单</a>
                    
                    <a  href="http://www.kikt.top/about/" title="关于">关于</a>
                    
                </nav>
            </div>
        </div>
    </div>
</header>


<div id="body">
    <div class="container">
        <div class="col-group">

            <div class="col-8" id="main">
                <div class="res-cons">
                    <article class="post">
                        <header>
                            <h1 class="post-title">上传图片到Azure</h1>
                        </header>
                        <date class="post-meta meta-date">
                            2020年1月31日
                        </date>
                        
                        <div class="post-meta meta-category">
                            |
                            
                                <a href="http://www.kikt.top/categories/other">other</a>
                            
                        </div>
                        
                        
                        <div class="post-meta">
                            <span id="busuanzi_container_page_pv">|<span id="busuanzi_value_page_pv"></span><span> 阅读</span></span>
                        </div>
                        
                        <div class="post-content">
                            <h2 id="前言">前言</h2>
<p>最近刚刚把图床迁移到 Azure, 因为 github 的图片不太好用,国内经常看不见</p>
<p>然而吧, 那是正则批量扫描 markdown 文件, 然后下载文件, 直接使用 git 管理的, 几百张的时候倒是还可以接受</p>
<p>但今后如果单张图片也需要这么做, 就很麻烦了, 以前是用 picGo 上传的图片</p>
<p>虽然现在 picGO 支持自己写插件, 但是 js 不是我的强项, 所以想自己写一个试试看</p>
<h2 id="api-分析">Api 分析</h2>
<p>azure 有 Rest api 可以完成上传的步骤, <a href="https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pushes/create?view=azure-devops-rest-5.0">文档</a></p>
<p>然而这个 api 需要一个 commitId, 不像 github 的 api 比较智能, 直接上传就行.</p>
<p>但没关系, 我们可以通过两次接口访问得到它.</p>
<p>使用 postman 来测试下</p>
<p>访问 <code>https://dev.azure.com/{{organization}}/{{project}}/_apis/git/repositories/{{repositoryId}}/pushes?api-version=5.0</code> 得到一个结果</p>
<p><img src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/df66928f-89ec-4688-abf0-d9acdc6cc858/items?path=%2F1580458172767.png&amp;versionDescriptor%5BversionOptions%5D=0&amp;versionDescriptor%5BversionType%5D=0&amp;versionDescriptor%5Bversion%5D=master&amp;resolveLfs=true&amp;%24format=octetStream&amp;api-version=5.0&amp;download=true" alt="img"></p>
<p>然后访问这个 url 参数的接口可以获取 commitId</p>
<p><img src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/df66928f-89ec-4688-abf0-d9acdc6cc858/items?path=%2F1580458246889.png&amp;versionDescriptor%5BversionOptions%5D=0&amp;versionDescriptor%5BversionType%5D=0&amp;versionDescriptor%5Bversion%5D=master&amp;resolveLfs=true&amp;%24format=octetStream&amp;api-version=5.0&amp;download=true" alt="img"></p>
<p>也就是 git 的 commit hash 值</p>
<p><img src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/df66928f-89ec-4688-abf0-d9acdc6cc858/items?path=%2F1580458511347.png&amp;versionDescriptor%5BversionOptions%5D=0&amp;versionDescriptor%5BversionType%5D=0&amp;versionDescriptor%5Bversion%5D=master&amp;resolveLfs=true&amp;%24format=octetStream&amp;api-version=5.0&amp;download=true" alt="img"></p>
<p>这里把 oldObjectId 替换成刚刚拿到的 commitId, 其他的根据自己的情况替换, 比如 comment 是注释, path 是你要放到哪个目录和名字, content 是图片的 base64 值</p>
<p>api 流程通了, 接下来就是技术的选择了</p>
<h2 id="技术选型">技术选型</h2>
<p>因为 dart 没有合适的 api 可以调用到剪切板, 所以我使用 swift 来完成这一步, 然后直接 base64 后输出到控制台</p>
<p>接着使用 dart 进行&quot;接力&rdquo;, 把图片的 base64 格式的图片上传到 azure 即可</p>
<p>至于为啥这么做, 我只能说, swift 不支持 async await 语法, 然后常用的 http 库都不支持同步访问, 我需要链式调用 3 个 api 真的是太麻烦了</p>
<h2 id="撸码">撸码</h2>
<h3 id="swift-部分">swift 部分</h3>
<p>创建一个 swift 的 command line 工程(macOS 版)</p>
<p>main.swift:</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-swift" data-lang="swift"><span style="color:#75715e">//</span>
<span style="color:#75715e">//  main.swift</span>
<span style="color:#75715e">//  ReadClipboard</span>
<span style="color:#75715e">//</span>
<span style="color:#75715e">//  Created by cjl on 2020/1/30.</span>
<span style="color:#75715e">//  Copyright © 2020 cjl. All rights reserved.</span>
<span style="color:#75715e">//</span>

<span style="color:#66d9ef">import</span> <span style="color:#a6e22e">Foundation</span>
<span style="color:#66d9ef">import</span> <span style="color:#a6e22e">AppKit</span>

<span style="color:#66d9ef">class</span> <span style="color:#a6e22e">UploadManager</span>{

    <span style="color:#66d9ef">let</span> pasteboard = NSPasteboard.general

    <span style="color:#66d9ef">func</span> <span style="color:#a6e22e">uploadFirst</span>(){
        <span style="color:#66d9ef">if</span> <span style="color:#66d9ef">let</span> data = pasteboard.data(forType: .fileURL){
            <span style="color:#75715e">// 上传文件类型的</span>
            <span style="color:#66d9ef">guard</span> <span style="color:#66d9ef">let</span> fileUri = NSString(data: data , encoding: String.Encoding.utf8.rawValue) <span style="color:#66d9ef">else</span>{
                print(<span style="color:#e6db74">&#34;虽然是文件类型, 但解析失败 : </span><span style="color:#e6db74">\(</span>data<span style="color:#e6db74">)</span><span style="color:#e6db74">&#34;</span>);
                <span style="color:#66d9ef">return</span>
            }
            <span style="color:#66d9ef">guard</span> <span style="color:#66d9ef">let</span> url = URL(string: fileUri <span style="color:#66d9ef">as</span> String) <span style="color:#66d9ef">else</span>{
                print(<span style="color:#e6db74">&#34;转为 URL 失败&#34;</span>)
                <span style="color:#66d9ef">return</span>
            }
            print(<span style="color:#e6db74">&#34;文件类型: </span><span style="color:#e6db74">\(</span>url<span style="color:#e6db74">)</span><span style="color:#e6db74">&#34;</span>)
            <span style="color:#66d9ef">guard</span> <span style="color:#66d9ef">let</span> contentData = <span style="color:#66d9ef">try</span>? Data(contentsOf: url) <span style="color:#66d9ef">else</span>{
                print(<span style="color:#e6db74">&#34;读取文件失败&#34;</span>)
                <span style="color:#66d9ef">return</span>
            }
            print(<span style="color:#e6db74">&#34;content count: </span><span style="color:#e6db74">\(</span>contentData.count<span style="color:#e6db74">)</span><span style="color:#e6db74">&#34;</span>)
<span style="color:#75715e">//            let last = url.lastPathComponent</span>
            upload(data: contentData)
            <span style="color:#66d9ef">return</span>
        }

        <span style="color:#75715e">// 图片类型</span>
        <span style="color:#66d9ef">if</span> <span style="color:#66d9ef">let</span> data = pasteboard.data(forType: .png){
            print(<span style="color:#e6db74">&#34;图片类型, 长度: </span><span style="color:#e6db74">\(</span>data.count<span style="color:#e6db74">)</span><span style="color:#e6db74">&#34;</span>)
            upload(data: data)
            <span style="color:#66d9ef">return</span>
        }

        <span style="color:#75715e">// 文件内容类型</span>
        <span style="color:#66d9ef">if</span> <span style="color:#66d9ef">let</span> data = pasteboard.data(forType: .fileContents){
            print(<span style="color:#e6db74">&#34;文件内容类型&#34;</span>)
            upload(data: data)
            <span style="color:#66d9ef">return</span>
        }

        print(<span style="color:#e6db74">&#34;其他类型 : </span><span style="color:#e6db74">\(</span>String<span style="color:#e6db74">(</span>describing: pasteboard.pasteboardItems?.first?.types<span style="color:#e6db74">))</span><span style="color:#e6db74">&#34;</span>)

        exit(<span style="color:#f92672">-</span><span style="color:#ae81ff">1</span>)
    }

    <span style="color:#66d9ef">func</span> <span style="color:#a6e22e">upload</span>(data:Data){
        <span style="color:#66d9ef">let</span> b64s = data.base64EncodedString()
        print(<span style="color:#e6db74">&#34;base64:</span><span style="color:#e6db74">\(</span>b64s<span style="color:#e6db74">)</span><span style="color:#e6db74">&#34;</span>)
    }
}

<span style="color:#66d9ef">let</span> manager = UploadManager()
manager.uploadFirst()
</code></pre></div><p>这里就是获取剪切板, 只导出文件或图片类型, 然后转为 base64, 接着拼接 base64: 然后输出下</p>
<p>之所以拼接是因为这样可以在 dart 端根据开头字符串来过滤其他日志信息,以便于&quot;接力&rdquo;</p>
<h4 id="dart-部分">dart 部分</h4>
<p>核心代码如下:</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart"><span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;dart:convert&#39;</span>;
<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;dart:io&#39;</span>;

<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;package:http/io_client.dart&#39;</span>;
<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;package:upload_image/src/uploader.dart&#39;</span>;
<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;package:http/http.dart&#39;</span> <span style="color:#66d9ef">as</span> http;

<span style="color:#66d9ef">class</span> <span style="color:#a6e22e">AzureUploader</span> <span style="color:#66d9ef">with</span> Uploader {
  <span style="color:#66d9ef">String</span> org;
  <span style="color:#66d9ef">String</span> project;
  <span style="color:#66d9ef">String</span> repo;
  <span style="color:#66d9ef">String</span> username;
  <span style="color:#66d9ef">String</span> password;

  <span style="color:#66d9ef">String</span> <span style="color:#66d9ef">get</span> url <span style="color:#f92672">=&gt;</span>
      <span style="color:#e6db74">&#39;https://dev.azure.com/</span><span style="color:#e6db74">$</span>org<span style="color:#e6db74">/</span><span style="color:#e6db74">$</span>project<span style="color:#e6db74">/_apis/git/repositories/</span><span style="color:#e6db74">$</span>repo<span style="color:#e6db74">/pushes?api-version=5.0&#39;</span>;

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">void</span> initConfig(Map<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">String</span>, <span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;</span> configs) {
    org <span style="color:#f92672">=</span> configs[<span style="color:#e6db74">&#39;org&#39;</span>];
    project <span style="color:#f92672">=</span> configs[<span style="color:#e6db74">&#39;project&#39;</span>];
    repo <span style="color:#f92672">=</span> configs[<span style="color:#e6db74">&#39;repo&#39;</span>];
    username <span style="color:#f92672">=</span> configs[<span style="color:#e6db74">&#39;user&#39;</span>];
    password <span style="color:#f92672">=</span> configs[<span style="color:#e6db74">&#39;token&#39;</span>];
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  Future<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">String</span><span style="color:#f92672">&gt;</span> upload(<span style="color:#66d9ef">String</span> imageContent) <span style="color:#66d9ef">async</span> {
    <span style="color:#66d9ef">final</span> lastCommitId <span style="color:#f92672">=</span> <span style="color:#66d9ef">await</span> _getLastCommitId();
    print(<span style="color:#e6db74">&#39;lastCommitId = </span><span style="color:#e6db74">$</span>lastCommitId<span style="color:#e6db74">&#39;</span>);
    <span style="color:#66d9ef">return</span> _upload(imageContent, lastCommitId);
  }

  Future<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">String</span><span style="color:#f92672">&gt;</span> _getLastCommitId() <span style="color:#66d9ef">async</span> {
    <span style="color:#66d9ef">final</span> response <span style="color:#f92672">=</span> <span style="color:#66d9ef">await</span> http.<span style="color:#66d9ef">get</span>(url);
    <span style="color:#66d9ef">final</span> map <span style="color:#f92672">=</span> json.decode(response.body);
    <span style="color:#66d9ef">final</span> commitResponse <span style="color:#f92672">=</span> <span style="color:#66d9ef">await</span> http.<span style="color:#66d9ef">get</span>(map[<span style="color:#e6db74">&#39;value&#39;</span>][<span style="color:#ae81ff">0</span>][<span style="color:#e6db74">&#39;url&#39;</span>]);
    <span style="color:#66d9ef">return</span> json.decode(commitResponse.body)[<span style="color:#e6db74">&#39;commits&#39;</span>][<span style="color:#ae81ff">0</span>][<span style="color:#e6db74">&#39;commitId&#39;</span>];
  }

  Future<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">String</span><span style="color:#f92672">&gt;</span> _upload(<span style="color:#66d9ef">String</span> imageContent, <span style="color:#66d9ef">String</span> lastCommitId) <span style="color:#66d9ef">async</span> {
    <span style="color:#66d9ef">final</span> token <span style="color:#f92672">=</span> base64.encode(ascii.encode(<span style="color:#e6db74">&#39;</span><span style="color:#e6db74">$</span>username<span style="color:#e6db74">:</span><span style="color:#e6db74">$</span>password<span style="color:#e6db74">&#39;</span>));
    <span style="color:#66d9ef">final</span> now <span style="color:#f92672">=</span> DateTime.now();
    <span style="color:#66d9ef">final</span> dt <span style="color:#f92672">=</span> now.toLocal().toString();
    <span style="color:#66d9ef">final</span> ms <span style="color:#f92672">=</span> now.millisecondsSinceEpoch;

    <span style="color:#66d9ef">final</span> pathName <span style="color:#f92672">=</span> <span style="color:#e6db74">&#39;</span><span style="color:#e6db74">$</span>ms<span style="color:#e6db74">.png&#39;</span>;

    <span style="color:#66d9ef">final</span> body <span style="color:#f92672">=</span> {
      <span style="color:#e6db74">&#39;refUpdates&#39;</span><span style="color:#f92672">:</span> [
        {
          <span style="color:#e6db74">&#39;name&#39;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;refs/heads/master&#39;</span>,
          <span style="color:#e6db74">&#39;oldObjectId&#39;</span><span style="color:#f92672">:</span> lastCommitId,
        },
      ],
      <span style="color:#e6db74">&#39;commits&#39;</span><span style="color:#f92672">:</span> [
        {
          <span style="color:#e6db74">&#39;comment&#39;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;add image at </span><span style="color:#e6db74">$</span>dt<span style="color:#e6db74">&#39;</span>,
          <span style="color:#e6db74">&#39;changes&#39;</span><span style="color:#f92672">:</span> [
            {
              <span style="color:#e6db74">&#39;changeType&#39;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;add&#39;</span>,
              <span style="color:#e6db74">&#39;item&#39;</span><span style="color:#f92672">:</span> {
                <span style="color:#e6db74">&#39;path&#39;</span><span style="color:#f92672">:</span> pathName,
              },
              <span style="color:#e6db74">&#39;newContent&#39;</span><span style="color:#f92672">:</span> {
                <span style="color:#e6db74">&#39;content&#39;</span><span style="color:#f92672">:</span> imageContent,
                <span style="color:#e6db74">&#39;contentType&#39;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;base64Encoded&#39;</span>,
              }
            }
          ],
        }
      ],
    };

    <span style="color:#66d9ef">final</span> httpClient <span style="color:#f92672">=</span> HttpClient();
    <span style="color:#75715e">// httpClient.findProxy = (proxy) {
</span><span style="color:#75715e"></span>    <span style="color:#75715e">//   return &#39;PROXY localhost:8888&#39;;
</span><span style="color:#75715e"></span>    <span style="color:#75715e">// };
</span><span style="color:#75715e"></span>
    <span style="color:#66d9ef">final</span> client <span style="color:#f92672">=</span> IOClient(httpClient);

    <span style="color:#66d9ef">final</span> response <span style="color:#f92672">=</span> <span style="color:#66d9ef">await</span> client.post(
      url,
      headers: {
        <span style="color:#e6db74">&#39;Authorization&#39;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;Basic </span><span style="color:#e6db74">$</span>token<span style="color:#e6db74">&#39;</span>,
        <span style="color:#e6db74">&#39;Content-Type&#39;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;application/json&#39;</span>,
      },
      body: json.encode(body),
    );

    <span style="color:#66d9ef">final</span> commitResult <span style="color:#f92672">=</span> json.decode(response.body);

    <span style="color:#66d9ef">final</span> repoUrl <span style="color:#f92672">=</span> commitResult[<span style="color:#e6db74">&#39;repository&#39;</span>][<span style="color:#e6db74">&#39;url&#39;</span>];

    <span style="color:#66d9ef">final</span> itemUrl <span style="color:#f92672">=</span>
        <span style="color:#e6db74">&#39;</span><span style="color:#e6db74">$</span>repoUrl<span style="color:#e6db74">/items?path=%2F</span><span style="color:#e6db74">${</span>pathName<span style="color:#e6db74">}</span><span style="color:#e6db74">&amp;versionDescriptor%5BversionOptions%5D=0&amp;versionDescriptor%5BversionType%5D=0&amp;versionDescriptor%5Bversion%5D=master&amp;resolveLfs=true&amp;%24format=octetStream&amp;api-version=5.0&amp;download=true&#39;</span>;

    <span style="color:#66d9ef">return</span> itemUrl;
  }
}

</code></pre></div><p>简单来说, 就是从 config 中读取出用户名,密码(token),工程名,仓库名几个属性, 然后完成 api 的调用, 接着使用 azure 图片的拼接方法来完成图片的上传</p>
<p>最后解析下, 获取到仓库的 url, 拼接 pathName 就可以获取到文件了</p>
<hr>
<p>最后一步, 使用一个三方库, 把完成的图片 url 自动复制到剪切板</p>
<h2 id="后记">后记</h2>
<p>本篇的图片就是用这个方法弄的, 不过还是挺麻烦的, 所以后面我还是会做一个 picGo 的插件来完成这些步骤</p>
<p>更新: <a href="https://github.com/CaiJingLong/picgo-plugin-azure">picgo 插件</a>开发完成</p>

                        </div>

                        

<div class="post-archive">
    <h2>See Also</h2>
    <ul class="listing">
        
        <li><a href="/posts/android/ffmpeg/compile-with-ndk20/">Android 记录在macOS上使用 NDK20 编译ffmpeg4.2.2的过程</a></li>
        
        <li><a href="/posts/blog/end-of-2019/">2019 总结</a></li>
        
        <li><a href="/posts/dart/2-6-exec/">dart 2.6(一) 生成可执行二进制</a></li>
        
        <li><a href="/posts/java/mac/compile-opencv4/">在 Mac 上编译 OpenCV4 &#43; Idea 使用Java调用</a></li>
        
        <li><a href="/posts/flutter/ffi/2-first-party/">在 flutter 上使用 c 代码 - (二) 无源码的项目</a></li>
        
    </ul>
</div>


                        <div class="post-meta meta-tags">
                            
                            <ul class="clearfix">
                                
                                <li><a href="http://www.kikt.top/tags/%E5%9B%BE%E5%BA%8A">图床</a></li>
                                
                                <li><a href="http://www.kikt.top/tags/azure">azure</a></li>
                                
                            </ul>
                            
                        </div>
                    </article>
                    
    

    
    
    <div class="post bg-white">
      <script src="https://utteranc.es/client.js"
            repo= "caijinglong/kikt-blog-comment"
            issue-term="pathname"
            theme="github-light"
            crossorigin="anonymous"
            async>
      </script>
    </div>
    
                </div>
            </div>
            <div id="secondary">
    <section class="widget">
        <form id="search" action="//www.google.com/search" method="get" accept-charset="utf-8" target="_blank" _lpchecked="1">
      
      <input type="text" name="q" maxlength="20" placeholder="Search">
      <input type="hidden" name="sitesearch" value="http://www.kikt.top">
      <button type="submit" class="submit icon-search"></button>
</form>
    </section>
    
    <section class="widget">
        <h3 class="widget-title">最近文章</h3>
<ul class="widget-list">
    
    <li>
        <a href="http://www.kikt.top/posts/java/crack/crack1/" title="使用javassist,修改jar包方法实现">使用javassist,修改jar包方法实现</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/github/actions/create/" title="Github action 的开发到发布">Github action 的开发到发布</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/jenkins&#43;fastlane/" title="flutter Jenkins&#43;fastlane 自动化打测试包, 并上传蒲公英">flutter Jenkins&#43;fastlane 自动化打测试包, 并上传蒲公英</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/go/compile-for-android/" title="编译 go 源码为 android 动态库(so)">编译 go 源码为 android 动态库(so)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/focusnode-2/" title="Flutter FocusNode 焦点那点事-(二)">Flutter FocusNode 焦点那点事-(二)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/focusnode-1/" title="Flutter FocusNode 焦点那点事-(一)">Flutter FocusNode 焦点那点事-(一)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/server/caddy/cros_for_local_dev/" title="用 Caddy 解决 web 开发中本地跨域的问题">用 Caddy 解决 web 开发中本地跨域的问题</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/route/navigator-helper2/" title="Navigator Helper2">Navigator Helper2</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/grey-app/" title="flutter 怎么实现app整体灰度">flutter 怎么实现app整体灰度</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/plugin/flutter-sdk-import-aar/" title="Flutter 插件开发之引入aar到安卓部分 并使用本地maven">Flutter 插件开发之引入aar到安卓部分 并使用本地maven</a>
    </li>
    
</ul>
    </section>

    

    <section class="widget">
        <h3 class="widget-title">分类</h3>
<ul class="widget-list">
    
    <li>
        <a href="http://www.kikt.top/categories/android/">android(25)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/caddy/">caddy(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/dart/">dart(5)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/docker/">docker(3)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/flutter/">flutter(60)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/github/">github(3)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/go/">go(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/golang/">golang(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/iOS/">iOS(6)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/ios/">ios(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/java/">java(6)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/jetbrains/">jetbrains(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/other/">other(3)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/python/">python(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/server/">server(5)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/spring/">spring(3)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/tools/">tools(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/%E6%9D%82%E9%A1%B9/">杂项(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/%E6%B6%82%E9%B8%A6/">涂鸦(1)</a>
    </li>
    
</ul>
    </section>

    <section class="widget">
        <h3 class="widget-title">标签</h3>
<div class="tagcloud">
    
    <a href="http://www.kikt.top/tags/10/">10</a>
    
    <a href="http://www.kikt.top/tags/2.3/">2.3</a>
    
    <a href="http://www.kikt.top/tags/Clipboard/">Clipboard</a>
    
    <a href="http://www.kikt.top/tags/Javassist/">Javassist</a>
    
    <a href="http://www.kikt.top/tags/Migrate/">Migrate</a>
    
    <a href="http://www.kikt.top/tags/aar/">aar</a>
    
    <a href="http://www.kikt.top/tags/actions/">actions</a>
    
    <a href="http://www.kikt.top/tags/aidl/">aidl</a>
    
    <a href="http://www.kikt.top/tags/android/">android</a>
    
    <a href="http://www.kikt.top/tags/androidQ/">androidQ</a>
    
    <a href="http://www.kikt.top/tags/androidX/">androidX</a>
    
    <a href="http://www.kikt.top/tags/apk/">apk</a>
    
    <a href="http://www.kikt.top/tags/app/">app</a>
    
    <a href="http://www.kikt.top/tags/appcode/">appcode</a>
    
    <a href="http://www.kikt.top/tags/azure/">azure</a>
    
    <a href="http://www.kikt.top/tags/ble/">ble</a>
    
    <a href="http://www.kikt.top/tags/bottomsheet/">bottomsheet</a>
    
    <a href="http://www.kikt.top/tags/butterknife/">butterknife</a>
    
    <a href="http://www.kikt.top/tags/c/">c</a>
    
    <a href="http://www.kikt.top/tags/caddy/">caddy</a>
    
    <a href="http://www.kikt.top/tags/camera/">camera</a>
    
    <a href="http://www.kikt.top/tags/cameraX/">cameraX</a>
    
    <a href="http://www.kikt.top/tags/channel/">channel</a>
    
    <a href="http://www.kikt.top/tags/cocoapods/">cocoapods</a>
    
    <a href="http://www.kikt.top/tags/cupertino/">cupertino</a>
    
    <a href="http://www.kikt.top/tags/dart/">dart</a>
    
    <a href="http://www.kikt.top/tags/dart-2.6/">dart-2.6</a>
    
    <a href="http://www.kikt.top/tags/desktop/">desktop</a>
    
    <a href="http://www.kikt.top/tags/dialog/">dialog</a>
    
    <a href="http://www.kikt.top/tags/dmg/">dmg</a>
    
    <a href="http://www.kikt.top/tags/doc/">doc</a>
    
    <a href="http://www.kikt.top/tags/docker/">docker</a>
    
    <a href="http://www.kikt.top/tags/docker-compose/">docker-compose</a>
    
    <a href="http://www.kikt.top/tags/excel/">excel</a>
    
    <a href="http://www.kikt.top/tags/exists/">exists</a>
    
    <a href="http://www.kikt.top/tags/faq/">faq</a>
    
    <a href="http://www.kikt.top/tags/fastlane/">fastlane</a>
    
    <a href="http://www.kikt.top/tags/ffi/">ffi</a>
    
    <a href="http://www.kikt.top/tags/ffmpeg/">ffmpeg</a>
    
    <a href="http://www.kikt.top/tags/flexmark/">flexmark</a>
    
    <a href="http://www.kikt.top/tags/flutter/">flutter</a>
    
    <a href="http://www.kikt.top/tags/flutter-web/">flutter-web</a>
    
    <a href="http://www.kikt.top/tags/focus/">focus</a>
    
    <a href="http://www.kikt.top/tags/focusNode/">focusNode</a>
    
    <a href="http://www.kikt.top/tags/form/">form</a>
    
    <a href="http://www.kikt.top/tags/framework/">framework</a>
    
    <a href="http://www.kikt.top/tags/github/">github</a>
    
    <a href="http://www.kikt.top/tags/go/">go</a>
    
    <a href="http://www.kikt.top/tags/golang/">golang</a>
    
    <a href="http://www.kikt.top/tags/gradle/">gradle</a>
    
    <a href="http://www.kikt.top/tags/http/">http</a>
    
    <a href="http://www.kikt.top/tags/iOS/">iOS</a>
    
    <a href="http://www.kikt.top/tags/ide/">ide</a>
    
    <a href="http://www.kikt.top/tags/idea/">idea</a>
    
    <a href="http://www.kikt.top/tags/index/">index</a>
    
    <a href="http://www.kikt.top/tags/inside/">inside</a>
    
    <a href="http://www.kikt.top/tags/ios/">ios</a>
    
    <a href="http://www.kikt.top/tags/java/">java</a>
    
    <a href="http://www.kikt.top/tags/jenkins/">jenkins</a>
    
    <a href="http://www.kikt.top/tags/jetbrains/">jetbrains</a>
    
    <a href="http://www.kikt.top/tags/jsdelivr/">jsdelivr</a>
    
    <a href="http://www.kikt.top/tags/json/">json</a>
    
    <a href="http://www.kikt.top/tags/json_serializable/">json_serializable</a>
    
    <a href="http://www.kikt.top/tags/junit/">junit</a>
    
    <a href="http://www.kikt.top/tags/library/">library</a>
    
    <a href="http://www.kikt.top/tags/live-template/">live-template</a>
    
    <a href="http://www.kikt.top/tags/loadmore/">loadmore</a>
    
    <a href="http://www.kikt.top/tags/log/">log</a>
    
    <a href="http://www.kikt.top/tags/mac/">mac</a>
    
    <a href="http://www.kikt.top/tags/macos/">macos</a>
    
    <a href="http://www.kikt.top/tags/maven/">maven</a>
    
    <a href="http://www.kikt.top/tags/mysql/">mysql</a>
    
    <a href="http://www.kikt.top/tags/navigationbar/">navigationbar</a>
    
    <a href="http://www.kikt.top/tags/navigator/">navigator</a>
    
    <a href="http://www.kikt.top/tags/ndk/">ndk</a>
    
    <a href="http://www.kikt.top/tags/nginx/">nginx</a>
    
    <a href="http://www.kikt.top/tags/oc/">oc</a>
    
    <a href="http://www.kikt.top/tags/opencv/">opencv</a>
    
    <a href="http://www.kikt.top/tags/poi/">poi</a>
    
    <a href="http://www.kikt.top/tags/pub/">pub</a>
    
    <a href="http://www.kikt.top/tags/python/">python</a>
    
    <a href="http://www.kikt.top/tags/retrofit/">retrofit</a>
    
    <a href="http://www.kikt.top/tags/route/">route</a>
    
    <a href="http://www.kikt.top/tags/server/">server</a>
    
    <a href="http://www.kikt.top/tags/so/">so</a>
    
    <a href="http://www.kikt.top/tags/spp/">spp</a>
    
    <a href="http://www.kikt.top/tags/sprintboot/">sprintboot</a>
    
    <a href="http://www.kikt.top/tags/swift/">swift</a>
    
    <a href="http://www.kikt.top/tags/tap/">tap</a>
    
    <a href="http://www.kikt.top/tags/thymeleaf/">thymeleaf</a>
    
    <a href="http://www.kikt.top/tags/tips/">tips</a>
    
    <a href="http://www.kikt.top/tags/toast/">toast</a>
    
    <a href="http://www.kikt.top/tags/transition/">transition</a>
    
    <a href="http://www.kikt.top/tags/ui/">ui</a>
    
    <a href="http://www.kikt.top/tags/utf8/">utf8</a>
    
    <a href="http://www.kikt.top/tags/yield/">yield</a>
    
    <a href="http://www.kikt.top/tags/%E4%BA%8C%E8%BF%9B%E5%88%B6/">二进制</a>
    
    <a href="http://www.kikt.top/tags/%E4%BA%A4%E5%8F%89/">交叉</a>
    
    <a href="http://www.kikt.top/tags/%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91/">交叉编译</a>
    
    <a href="http://www.kikt.top/tags/%E4%BB%8B%E7%BB%8D/">介绍</a>
    
    <a href="http://www.kikt.top/tags/%E4%BB%A3%E7%A0%81%E8%A7%84%E8%8C%83/">代码规范</a>
    
    <a href="http://www.kikt.top/tags/%E5%86%B2%E7%AA%81/">冲突</a>
    
    <a href="http://www.kikt.top/tags/%E5%8A%A8%E6%80%81/">动态</a>
    
    <a href="http://www.kikt.top/tags/%E5%8F%91%E5%B8%83/">发布</a>
    
    <a href="http://www.kikt.top/tags/%E5%8F%AF%E6%89%A7%E8%A1%8C/">可执行</a>
    
    <a href="http://www.kikt.top/tags/%E5%9B%BE%E5%BA%8A/">图床</a>
    
    <a href="http://www.kikt.top/tags/%E5%9F%8E%E5%B8%82/">城市</a>
    
    <a href="http://www.kikt.top/tags/%E5%A4%A7%E6%96%87%E4%BB%B6/">大文件</a>
    
    <a href="http://www.kikt.top/tags/%E5%B7%A5%E5%85%B7/">工具</a>
    
    <a href="http://www.kikt.top/tags/%E5%B7%B2%E6%9C%89%E9%A1%B9%E7%9B%AE/">已有项目</a>
    
    <a href="http://www.kikt.top/tags/%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/">开发环境</a>
    
    <a href="http://www.kikt.top/tags/%E6%80%BB%E7%BB%93/">总结</a>
    
    <a href="http://www.kikt.top/tags/%E6%85%A2/">慢</a>
    
    <a href="http://www.kikt.top/tags/%E6%89%93%E5%8C%85/">打包</a>
    
    <a href="http://www.kikt.top/tags/%E6%89%AB%E7%A0%81/">扫码</a>
    
    <a href="http://www.kikt.top/tags/%E6%8F%92%E4%BB%B6/">插件</a>
    
    <a href="http://www.kikt.top/tags/%E6%96%87%E6%A1%A3/">文档</a>
    
    <a href="http://www.kikt.top/tags/%E6%A8%A1%E6%9D%BF/">模板</a>
    
    <a href="http://www.kikt.top/tags/%E6%B8%B2%E6%9F%93/">渲染</a>
    
    <a href="http://www.kikt.top/tags/%E6%BA%90%E7%A0%81%E8%A7%A3%E6%9E%90/">源码解析</a>
    
    <a href="http://www.kikt.top/tags/%E7%81%B0%E5%BA%A6/">灰度</a>
    
    <a href="http://www.kikt.top/tags/%E7%82%B9%E5%87%BB/">点击</a>
    
    <a href="http://www.kikt.top/tags/%E7%84%A6%E7%82%B9/">焦点</a>
    
    <a href="http://www.kikt.top/tags/%E7%88%AC%E8%99%AB/">爬虫</a>
    
    <a href="http://www.kikt.top/tags/%E7%8A%B6%E6%80%81%E7%AE%A1%E7%90%86/">状态管理</a>
    
    <a href="http://www.kikt.top/tags/%E7%99%BE%E5%BA%A6%E5%9C%B0%E5%9B%BE/">百度地图</a>
    
    <a href="http://www.kikt.top/tags/%E7%BC%96%E7%A0%81/">编码</a>
    
    <a href="http://www.kikt.top/tags/%E7%BC%96%E7%A8%8B%E6%8A%80%E5%B7%A7/">编程技巧</a>
    
    <a href="http://www.kikt.top/tags/%E7%BC%96%E8%AF%91/">编译</a>
    
    <a href="http://www.kikt.top/tags/%E7%BF%BB%E8%AF%91/">翻译</a>
    
    <a href="http://www.kikt.top/tags/%E8%93%9D%E7%89%99/">蓝牙</a>
    
    <a href="http://www.kikt.top/tags/%E8%A1%A8%E5%8D%95/">表单</a>
    
    <a href="http://www.kikt.top/tags/%E8%B7%AF%E7%94%B1/">路由</a>
    
    <a href="http://www.kikt.top/tags/%E8%BF%87%E5%9C%BA%E5%8A%A8%E7%94%BB/">过场动画</a>
    
    <a href="http://www.kikt.top/tags/%E9%9A%90%E7%A7%81/">隐私</a>
    
</div>
    </section>

    
<section class="widget">
    <h3 class="widget-title">友情链接</h3>
    <ul class="widget-list">
        
        <li>
            <a target="_blank" href="https://github.com/Caijinglong" title="我的Github">我的Github</a>
        </li>
        
        <li>
            <a target="_blank" href="https://flutter.dev" title="flutter 官网">flutter 官网</a>
        </li>
        
    </ul>
</section>


    <section class="widget">
        <h3 class="widget-title">其它</h3>
        <ul class="widget-list">
            <li><a href="http://www.kikt.top/index.xml">文章 RSS</a></li>
        </ul>
    </section>
</div>
        </div>
    </div>
</div>
<footer id="footer">
    <div class="container">
        <div>
            <p>如果我的blog对您有帮助,而您愿意捐赠 😆, 可以用下面的二维码</p>
            <img style="width:5rem;" src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&resolveLfs=true&%24format=octetStream&api-version=5.0&path=%2F20190424141834.png"/>
            <img style="width:5rem; padding-left: 2rem;" 
            src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&resolveLfs=true&%24format=octetStream&api-version=5.0&path=%2F20190424141931.png"/>
            <img style="width:5rem; padding-left: 2rem;" 
            src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&resolveLfs=true&%24format=octetStream&api-version=5.0&path=%2F20190424142013.png"/>
        </div>
        &copy; 2018 <a href="http://www.kikt.top">caijinglong的博客 By caijinglong</a>.
        Powered by <a rel="nofollow noreferer noopener" href="https://gohugo.io" target="_blank">Hugo</a>.
        <a href="http://www.flysnow.org/" target="_blank">Theme</a> based on <a href="https://github.com/rujews/maupassant-hugo" target="_blank">maupassant</a>.<br/>
        本站所有内容基于<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" style="color:coral">CC4.0</a>协议发布,需要转载必须署名
        <br/>
        如果有问题可以<a href="mailto:cjl_spy@163.com">email联系我</a>
        <br/>
        京ICP备18038473号-1
        
    </div>
</footer>


    <script type="text/javascript" src="/js/prism.js" async="true"></script>
    <script type="text/javascript">
    
    (function(){
        $("pre code").parent().addClass("line-numbers")
    }())

    window.MathJax = {
        tex2jax: {
            inlineMath: [ ['$','$'] ],
            processEscapes: true
        }
    };
    </script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML' async></script>

<a id="rocket" href="#top"></a>
<script type="text/javascript" src="/js/totop.js?v=0.0.0" async=""></script>



<script type="text/javascript" src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" async></script>




</body>
</html>
